package com.ysx.student.zhangqingrong.com.ysx.day3;

/**
 * @author 张青荣
 */
public class DemoTe2 {

    public static void main(String[] args) {

        int sum = getSum();
        System.out.println(sum);


    }

    private static int getSum() {
        int sum = 0;
        int i = 1;
        while (i < 100) {

            i = i + 1;

            if (i % 2 == 0) {
                sum = sum + i;
            }

        }
        return sum;
    }
}

